/*
Sachini Bandara	
Proposal Title: A Randomized Experiment to Test the Effects of Message Frames on Social Stigma and Support for Punitive Policies towards Individuals with Prior Drug Convictions

HYPOTHESES

Stated-Hyp1: Compared to a no exposure control arm, exposure to the consequence frames (Public
Safety, Social Justice and Impact on Children) will: 1) decrease stigma towards
individuals with a felony drug conviction and 2) increase policy support for less
punitive policies
Group 1 vs. Group 0
Group 2 vs. Group 0
Group 3 vs. Group 0

	Test-Hyp1: Compared to control, exposure to the Public Safety frame will decrease stigma towards individuals with a felony drug conviction 
	
	Test-Hyp2: Compared to control exposure to the Public Safety frame will increase policy support for less punitive policies

	Test-Hyp3: Compared to control, exposure to the Social Justice frame will decrease stigma towards individuals with a felony drug conviction 
	
	Test-Hyp4: Compared to control, exposure to the Social Justice frame will increase policy support for less punitive policies

	Test-Hyp5: Compared to control, exposure to the Impact on Children frame will decrease stigma towards individuals with a felony drug conviction 
	
	Test-Hyp6: Compared to control, exposure to the Impact on Children frame will increase policy support for less punitive policies

Stated-Hyp2: Compared to the consequence frames alone (Public Safety, Social Justice and Impact
on Children), the consequence frames in combination with a sympathetic narrative
will have a greater 1) decrease in stigma towards individuals with a felony drug
conviction and 2) increase in policy support for less punitive policies
Group 1 vs. Groups 4 & 7
Group 2 vs. Groups 5 & 8
Group 3 vs. Groups 6 & 9

	Test-Hyp7: Compared to the frame alone, the public safety frame in combination with a sympathetic narrative will have a greater decrease in stigma towards individuals with a felony drug
conviction 
	
	Test-Hyp8: Compared to the frame alone, the public safety frame in combination with a sympathetic narrative will have a greater increase in policy support for less punitive policies

	Test-Hyp9: Compared to the frame alone, the social justice frame in combination with a sympathetic narrative will have a greater decrease in stigma towards individuals with a felony drug
conviction 
	
	Test-Hyp10: Compared to the frame alone, the social justice frame in combination with a sympathetic narrative will have a greater increase in policy support for less punitive policies
	
	Test-Hyp11: Compared to the frame alone, the impact on children frame in combination with a sympathetic narrative will have a greater decrease in stigma towards individuals with a felony drug
conviction 
	
	Test-Hyp12: Compared to the frame alone, the impact on children frame in combination with a sympathetic narrative will have a greater increase in policy support for less punitive policies
	

Stated-Hyp3: Within exposures including the consequence frames in combination with a
sympathetic narrative: Compared to narratives featuring a photograph of a white recently-released
man, narratives featuring a photograph of a black recently-released man will be
associated with smaller 1) decreases in stigma towards individuals with a felony
drug conviction and 2) increases in policy support for less punitive policies
Group 4 vs. Group 7
Group 5 vs. Group 8
Group 6 vs. Group 9

	Test-Hyp13: Compared to narratives featuring a photograph of a white recently-released
man, narratives featuring a photograph of a black recently-released man will be
associated with smaller decreases in stigma towards individuals with a felony
drug conviction (within public safety frame in combination with sympathetic narrative)

	Test-Hyp14: Compared to narratives featuring a photograph of a white recently-released
man, narratives featuring a photograph of a black recently-released man will be
associated with smaller increases in policy support for less punitive policies (within public safety frame in combination with sympathetic narrative)

	Test-Hyp15: Compared to narratives featuring a photograph of a white recently-released
man, narratives featuring a photograph of a black recently-released man will be
associated with smaller decreases in stigma towards individuals with a felony
drug conviction (within social justice frame in combination with sympathetic narrative)

	Test-Hyp16: Compared to narratives featuring a photograph of a white recently-released
man, narratives featuring a photograph of a black recently-released man will be
associated with smaller increases in policy support for less punitive policies (within social justice frame in combination with sympathetic narrative)

	Test-Hyp17: Compared to narratives featuring a photograph of a white recently-released
man, narratives featuring a photograph of a black recently-released man will be
associated with smaller decreases in stigma towards individuals with a felony
drug conviction (within impact on children frame in combination with sympathetic narrative)

	Test-Hyp18: Compared to narratives featuring a photograph of a white recently-released
man, narratives featuring a photograph of a black recently-released man will be
associated with smaller increases in policy support for less punitive policies (within impact on children frame in combination with sympathetic narrative)

Stated-Hyp4: 
Political affiliation and personal experience with drug use disorder and/or the criminal
justice system will modify the effects of the consequence frames on 1) stigma towards
individuals with a felony drug conviction and 2) policy support for less punitive
policies
• Within the Social Justice and Impact on Children consequence frames,
Democrats will be associated with greater decreases in stigma and increases in
policy support compared to Republicans and Independents
• Within the Public Safety consequence frames, Republicans will be associated
with greater decreases in stigma and increases in policy support compared to
Democrats and Independents
• Compared to not having personal experience with drug use disorder, having
personal experience with drug use disorder will be associated with greater
decreases in stigma and increases in policy support
• Compared to not having personal experience with the criminal justice system,
having personal experience with the criminal justice system will be associated
with greater decreases in stigma and increases in policy support

Group 1 vs. Group 0
Group 2 vs. Group 0
Group 3 vs. Group 0
Group 1 vs. Groups 4 & 7
Group 2 vs. Groups 5 & 8
Group 3 vs. Groups 6 & 9

	Test-Hyp19: Within the Social Justice and Impact on Children consequence frames,
Democrats will be associated with greater decreases in stigma 

	Test-Hyp20: Within the Social Justice and Impact on Children consequence frames,
Democrats will be associated with greater increases in policy support compared to Republicans and Independents

	Test-Hyp21: Within the Public Safety consequence frames, Republicans will be associated
with greater decreases in stigma 

	Test-Hyp22: Within the Public Safety consequence frames, Republicans will be associated
with greater increases in policy support compared to
Democrats and Independents

	Test-Hyp23: Compared to not having personal experience with drug use disorder, having
personal experience with drug use disorder will be associated with greater
decreases in stigma 

	Test-Hyp24: Compared to not having personal experience with drug use disorder, having
personal experience with drug use disorder will be associated with greater increases in policy support

	Test-Hyp25: Compared to not having personal experience with the criminal justice system,
having personal experience with the criminal justice system will be associated
with greater decreases in stigma 

	Test-Hyp26: Compared to not having personal experience with the criminal justice system,
having personal experience with the criminal justice system will be associated
with greater greater increases in policy support

********************************************************************************
* NOTES:
- This study has 26 tests. There are 2 main outcomes: stigma (measured using 2 items) and policy preference (measured using 4 items). Because this study is long, we combined the two stigma items and the 4 policy preference items. If we keep the items separate, then the total number of tests will be 78. 
	// Discussed in meeting on 2-9-2021. 

*/

clear all
use "Bandara1015.dta", clear

********************************************************************************

* CONSTRUCT INDICATORS OF EXPERIMENTAL MANIPULATIONS

* treatment 
	tab P_TESS020
	clonevar treatment= P_TESS020
	tab treatment, mis

* consequence frame only
		gen frame_pubsafety = 0 if treatment==0
		replace frame_pubsafety=1 if treatment==1
		
		gen frame_socjustice = 0 if treatment==0
		replace frame_socjustice=1 if treatment==2
		
		gen frame_children = 0 if treatment==0
		replace frame_children=1 if treatment==3

* sympathetic narrative	
		recode treatment (4/9=1) (1/3=0), gen(narrative)

* frame type including narratives
		recode treatment (1=1) (4=1) (7=1), gen(all_pubsafety)
		recode treatment (2=1) (5=1) (8=1), gen(all_socjustice)
		recode treatment (3=1) (6=1) (9=1), gen(all_children)
		
		
* Race
		recode treatment (4/6=1) (7/9=0) (*=.), gen(black)

	
* MODERATORS

* political affiliation
	tab PartyID5, mis
	recode PartyID5 (1/2=1) (3=2) (4/5=3) (-1=.), gen(partyid)
	lab def partyid 1 "democrat" 2 "indep./none" 3 "republican"
	lab val partyid partyid
	tab partyid

	recode partyid (1=1) (2/3=0), gen(democrat)
	recode partyid (1/2=0) (3=1), gen(republican)
	
* personal history of drug use
	tab Q7_1, mis
	clonevar used_drugs = Q7_1
	tab used_drugs, mis
	
* personal history of arrest
	clonevar arrested = Q8_1
	tab arrested, mis
	
* CONSTRUCT OUTCOME MEASURES

* stigma
	* note: higher values shows great acceptance
	clonevar accept_neighbor=Q5
	clonevar accept_rehabilitate=Q6 
	
	foreach var of varlist accept* {
	replace `var'=. if `var'>5
	tab `var', mis
	}
	
	// recode so higher value indicate more stigma
	foreach var of varlist accept* {
	gen not`var' = 6-`var'
	tab `var', mis
	}
	
	// created summated measure
	gen stigma =  notaccept_neighbor + notaccept_rehabilitate
	tab stigma
	
* support for less punitive policies
	clonevar pro_minsentence=Q1
	clonevar pro_snap=Q2
	clonevar pro_housing=Q3
	clonevar pro_banbox=Q4
	
	foreach var of varlist pro* {
	replace `var'=. if `var'>5
	tab `var', mis
	}
	
	gen policysupport= pro_minsentence+pro_snap+pro_housing + pro_banbox
	tab policysupport
	
********************************************************************************

* ANALYSIS
	
*Test-Hyp1: Compared to control, exposure to the Public Safety frame will decrease stigma towards individuals with a felony drug conviction 
	
	reg stigma i.frame_pubsafety
	// reject. 0.123 
	tess 1.frame_pubsafety -, init(Bandara1015) bonf(2)
		
	
*Test-Hyp2: Compared to control exposure to the Public Safety frame will increase policy support for less punitive policies

	reg policysupport i.frame_pubsafety
	//  0.020
	// bonferroni correction
	di 0.05/2

	tess 1.frame_pubsafety +, bonf(2)
		
	
*Test-Hyp3: Compared to control, exposure to the Social Justice frame will decrease stigma towards individuals with a felony drug conviction 
	
	reg stigma i.frame_socjustice
	// reject 0.135
	
	tess 1.frame_socjustice -, bonf(2)
			
	
*Test-Hyp4: Compared to control, exposure to the Social Justice frame will increase policy support for less punitive policies

	reg policysupport i.frame_socjustice
	//  0.002 
	// bonferroni correction
	di 0.05/2	

	tess 1.frame_socjustice +, bonf(2)
	
	
*Test-Hyp5: Compared to control, exposure to the Impact on Children frame will decrease stigma towards individuals with a felony drug conviction 
	
	reg stigma i.frame_children
	// reject: 0.046 
	// bonferroni correction
	di 0.05/2		
	
	tess 1.frame_children -, bonf(2)
	
	
*Test-Hyp6: Compared to control, exposure to the Impact on Children frame will increase policy support for less punitive policies

	reg policysupport i.frame_children
	// reject: 0.004
	// bonferroni correction
	di 0.05/2		
	
	tess 1.frame_children +, bonf(2)
	
*Test-Hyp7: Compared to the frame alone, the public safety frame in combination with a sympathetic narrative will have a greater decrease in stigma towards individuals with a felony drug conviction 
	
	reg stigma i.narrative if all_pubsafety==1
	// . 0.004
	
	tess 1.narrative -, bonf(2)	
	
*Test-Hyp8: Compared to the frame alone, the public safety frame in combination with a sympathetic narrative will have a greater increase in policy support for less punitive policies

	reg policysupport i.narrative if all_pubsafety==1
	// reject. 0.106

	tess 1.narrative -, bonf(2)		
	
*Test-Hyp9: Compared to the frame alone, the social justice frame in combination with a sympathetic narrative will have a greater decrease in stigma towards individuals with a felony drug conviction 
	
	reg stigma i.narrative if all_socjustice==1
	//  0.015 

	tess 1.narrative -, bonf(2)		
	
*Test-Hyp10: Compared to the frame alone, the social justice frame in combination with a sympathetic narrative will have a greater increase in policy support for less punitive policies

	reg policysupport i.narrative if all_socjustice==1
	// reject. 0.059 
	
	tess 1.narrative -, bonf(2)		
	
*Test-Hyp11: Compared to the frame alone, the impact on children frame in combination with a sympathetic narrative will have a greater decrease in stigma towards individuals with a felony drug conviction 

	reg stigma i.narrative if all_children==1
	//   0.010  
	
	tess 1.narrative -, bonf(2)		
	
*Test-Hyp12: Compared to the frame alone, the impact on children frame in combination with a sympathetic narrative will have a greater increase in policy support for less punitive policies

	reg policysupport i.narrative if all_children==1
	//  0.018

	tess 1.narrative +, bonf(2)		
	
*Test-Hyp13: Compared to narratives featuring a photograph of a white recently-released man, narratives featuring a photograph of a black recently-released man will be associated with smaller decreases in stigma towards individuals with a felony drug conviction (within public safety frame in combination with sympathetic narrative)

	reg stigma i.black if narrative==1&all_pubsafety==1
	// reject. 0.203 
	
	tess 1.black -, bonf(2)		
	
*Test-Hyp14: Compared to narratives featuring a photograph of a white recently-released man, narratives featuring a photograph of a black recently-released man will be associated with smaller increases in policy support for less punitive policies (within public safety frame in combination with sympathetic narrative)

	reg policysupport i.black if narrative==1&all_pubsafety==1
	// reject. 0.350
	
	tess 1.black -, bonf(2)			
	
*Test-Hyp15: Compared to narratives featuring a photograph of a white recently-released man, narratives featuring a photograph of a black recently-released man will be associated with smaller decreases in stigma towards individuals with a felony drug conviction (within social justice frame in combination with sympathetic narrative)

	reg stigma i.black if narrative==1&all_socjustice==1
	// reject. 0.772

	tess 1.black -, bonf(2)			
	
*Test-Hyp16: Compared to narratives featuring a photograph of a white recently-released man, narratives featuring a photograph of a black recently-released man will be associated with smaller increases in policy support for less punitive policies (within social justice frame in combination with sympathetic narrative)

	reg policysupport i.black if narrative==1&all_socjustice==1
	// reject. 0.762
	
	tess 1.black -, bonf(2)			
	
*Test-Hyp17: Compared to narratives featuring a photograph of a white recently-released man, narratives featuring a photograph of a black recently-released man will be associated with smaller decreases in stigma towards individuals with a felony drug conviction (within impact on children frame in combination with sympathetic narrative)

	reg stigma i.black if narrative==1&all_children==1
	// reject. 0.169
	
	tess 1.black -, bonf(2)			
	
*Test-Hyp18: Compared to narratives featuring a photograph of a white recently-released man, narratives featuring a photograph of a black recently-released man will be associated with smaller increases in policy support for less punitive policies (within impact on children frame in combination with sympathetic narrative)

	reg policysupport i.black if narrative==1&all_children==1	
	// reject. 0.391
	
	tess 1.black -, bonf(2)			
	
*Test-Hyp19: Within the Social Justice and Impact on Children consequence frames, Democrats will be associated with greater decreases in stigma 
	
	gen comp=frame_socjustice
	replace comp=1 if frame_children==1
	
	reg stigma i.democrat#i.comp
	//  0.000
	
	tess 1.democrat#1.comp -, bonf(2)			
	
*Test-Hyp20: Within the Social Justice and Impact on Children consequence frames, Democrats will be associated with greater increases in policy support compared to Republicans and Independents

	reg policysupport i.democrat#i.comp
	//  0.000
	tess 1.democrat#1.comp +, bonf(2)		
	
*Test-Hyp21: Within the Public Safety consequence frames, Republicans will be associated with greater decreases in stigma 

	reg stigma i.republican#i.frame_pubsafety
	// 0.000
	tess 1.republican#1.frame_pubsafety -, bonf(2)		
	
*Test-Hyp22: Within the Public Safety consequence frames, Republicans will be associated with greater increases in policy support compared to Democrats and Independents

	reg policysupport i.republican#i.frame_pubsafety
	//  0.000
	tess 1.republican#1.frame_pubsafety +, bonf(2)		
	
*Test-Hyp23: Compared to not having personal experience with drug use disorder, having personal experience with drug use disorder will be associated with greater decreases in stigma 

	reg stigma i.used_drugs 
	//  0.000
	tess 1.used_drugs -, bonf(2)			
	
*Test-Hyp24: Compared to not having personal experience with drug use disorder, having personal experience with drug use disorder will be associated with greater increases in policy support

	reg policysupport i.used_drugs 
	//  0.001	
	tess 1.used_drugs +, bonf(2)		
	
*Test-Hyp25: Compared to not having personal experience with the criminal justice system, having personal experience with the criminal justice system will be associated with greater decreases in stigma 

	reg stigma i.arrested
	//  0.000
	tess 1.arrested -, bonf(2)		
	
*Test-Hyp26: Compared to not having personal experience with the criminal justice system, having personal experience with the criminal justice system will be associated with greater greater increases in policy support

	reg policysupport i.arrested
	// . 0.003
	
	tess 1.arrested +, bonf(2)	
